package oh.june.calleridentifier.module;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	public static String toPatternedDate(String pattern, String sourcePattern, String source) throws Exception{
		if(source.equals(""))
			return source;
		SimpleDateFormat sdf = new SimpleDateFormat(sourcePattern);
		Date d = sdf.parse(source);
		sdf.applyPattern(pattern);
		return sdf.format(d);
	}
}
